import type { VbenFormSchema } from '#/adapter/form'
import {
    assetsFrequentlyTradedOptions,
    approachOptions,
    holdingPeriodOptions,
    experienceOptions
} from '#/config/options/status'

export function getAddEditFormSchema() {
    return [
        {
            fieldName: 'avatarUrl',
            label: '头像',
            component: 'ImageUpload',
            rules: 'required'
        },
        {
            fieldName: 'name',
            label: '昵称',
            defaultValue: '',
            component: 'Input'
        },
        {
            fieldName: 'websiteUrl',
            label: '外链',
            component: 'Input'
        },
        {
            fieldName: 'location',
            label: '地区',
            component: 'Input'
        },
        {
            fieldName: 'homeCountry',
            label: '区域',
            component: 'Input'
        },
        {
            fieldName: 'assetsFrequentlyTraded',
            label: '交易最频繁的资产',
            component: 'Select',
            componentProps: {
                class: 'w-full',
                options: assetsFrequentlyTradedOptions,
                mode: 'multiple'
            }
        },
        {
            fieldName: 'approach',
            label: '交易方法',
            component: 'Select',
            componentProps: {
                class: 'w-full',
                options: approachOptions
            }
        },
        {
            fieldName: 'holdingPeriod',
            label: '主要持有期',
            component: 'Select',
            componentProps: {
                class: 'w-full',
                options: holdingPeriodOptions
            }
        },
        {
            fieldName: 'experience',
            label: '经验',
            component: 'Select',
            componentProps: {
                class: 'w-full',
                options: experienceOptions
            }
        },
        {
            fieldName: 'bio',
            label: '简介',
            component: 'Textarea',
            defaultValue: '请输入简介'
        },
        {
            fieldName: 'remark',
            label: '备注',
            component: 'Input'
        }
    ] as VbenFormSchema[]
}
